<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    body {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    .box {
      width: 100px;
      height: 100px;
      /* 使用动画 */
      animation: myMove 3s infinite;
    }

    /* 定义动画 */
    @keyframes myMove {
      0% {
        background: green;
        transform: scale(1);
      }

      100% {
        background: red;
        transform: scale(2);
        border-radius: 50%;
      }
    }
  </style>
</head>

<body>
  <div class="box"></div>

</body>

</html>